<?php

interface IAsteriskApiBase {
	public function __construct(array $config = array());
	public function __destruct();
	public function connect(array $config = array());
	public function close();
	public function logIn($username = null, $password = null);
	public function logOff();
	public function isLoggedIn();
	public function socketOpen();
	public function ping();
}

interface IAsteriskApiCall {
	public function callTo($to, $channel, $context, $callerId, $prio = 1, $timeout = 30000, array $variables = array(), $actionId = null);
	public function hangup($channel);
	public function redirect($channel, $to, $context);
	public function monitor($channel, $fileName = '', $mix = 0);
	public function stopMonitor($channel);	
	public function status($channel);
}
